import java.util.Scanner;

public class Preclass03 {
    //斐波那契数列
        public static void main(String[] args) {
            Scanner scanner = new Scanner(System.in);
            System.out.print("请输入一个正整数：");
            int num = scanner.nextInt();

            System.out.print(num + " 的质因数为：");
            primeFactorization(num);

            scanner.close();
        }

        public static void primeFactorization(int num) {
            for (int i = 2; i <= num; i++) {
                while (num % i == 0) {
                    System.out.print(i + " ");
                    num /= i;
                }
            }
            if (num > 1) {
                System.out.print(num);
            }
            System.out.println();
        }
    }

